package com.example.spring_config.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.spring_config.mapper.Role;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface RoleDao extends BaseMapper<Role> {

    /**
     * 根据用户id查询权限
     * @param id 用户id
     * @return
     */
    List<Role> getRoleList(String id);

    /**
     * 根据用户id获取权限名
     * @param uid
     * @return
     */
    List<String> getRoleNameByUid(String uid);

}
